#pragma once
//#include "AbstractItemDelegate.h"

namespace DuiLib
{

	class UILIB_API CEditorItemDelegate : public CAbstractItemDelegate
	{
	public:
		CEditorItemDelegate();
		~CEditorItemDelegate();

	protected:
		virtual CControlUI* createEditor(CControlUI* target);

		virtual void destroyEditor(CControlUI* editor);

		virtual void setEditorData(CControlUI* editor, const CModelIndex& index);

		virtual void setModelData(CControlUI* editor, const CModelIndex& index);

	private:
		void onEditReturn(CControlUI* editor);

		CControlUI* m_TargetCtrl;
	};

}